#pragma once
#include "dllmain.h"

#include <string>

BEGIN_NAMESPACE_CPPX

class fuStringTokenizer
{
public:
    static const std::string DEFAULT_DELIMITERS;
    fuStringTokenizer(const std::string& str);
    fuStringTokenizer(const std::string& str, const std::string& delimiters);

    bool nextToken(void);
    bool nextToken(const std::string& delimiters);
    const std::string getToken(void) const;

    /**
    * to reset the tokenizer. After reset it, the tokenizer can get
    * the tokens from the first token.
    */
    void reset();

protected:
    const std::string m_String;
    std::string m_Delimiters;
    std::string m_Token;
    size_t m_Offset;
};

END_NAMESPACE_CPPX
